<script setup>
const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  show: {
    type: Boolean,
    default: true
  }
})
const emit = defineEmits(['add', 'remove'])
</script>

<template>
  <div class="box">
    <div class="title">{{ props.title }}</div>
    <div class="flex" v-show="props.show">
      <el-tooltip class="box-item" effect="dark" content="添加" placement="top-start">
        <el-icon style="cursor: pointer" @click.stop="emit('add')"><Plus /></el-icon>
      </el-tooltip>
      <div style="margin: 0 10px; cursor: pointer"></div>
      <el-tooltip class="box-item" effect="dark" content="勾选删除" placement="top-start">
        <el-icon style="cursor: pointer" @click.stop="emit('remove')"><Minus /></el-icon>
      </el-tooltip>
    </div>
  </div>
</template>
<style scoped lang="scss">
.box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.title {
  font-size: 14px;
}
</style>
